package com.example.broadcast.receiver

import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import android.util.Log
import android.widget.Toast

class FirstOrderReceiver: BroadcastReceiver() {

    override fun onReceive(context: Context?, intent: Intent?) {
        context?.let{
            val msg = intent?.getStringExtra("msg") ?:""
            Log.d("FirstOrderReceiver","收到广播  $msg")

            Toast.makeText(it,"FirstOrderReceiver 收到 $msg",Toast.LENGTH_SHORT).show()

        }
    }
}